home *** CD-ROM | disk | FTP | other *** search
/ Risc World 3 / Risc World 3.iso / SOFTWARE / ISSUE4 / ZAP / !Zap / Modules / !ZapJRF / Scripts / HTML / Tab < prev   
Text File  |  2002-05-08  |  1KB  |  52 lines

  1. | Tab - move between attributes if inside a tag, otherwise 'tab' !
  2. | This is a CHEAT - JRF_IF installs a larger stack so that we can execute
  3. | longer commands; we are at a depth of 4 (MJE,RUNSCRIPT,TMT_IF,INSERT)
  4. | which Zap can't quite cope with (it calls the redraw routines which
  5. | dies on the stacking call)
  6. JRF_IF "¤¤TMT_IF ""INHTMLTAG THEN INSERT """"Abracadiodularservosystems"""":UNIVERSALARG """"26"""":LEFT"""
  7. #IfText "Abracadiodularservosystems"
  8.  UNIVERSALARG "26"
  9.  DELETENEXT
  10.  SEARCHFORWARD "\(  \*\)\|>"
  11.  LEFT
  12.  #IfText ">"
  13.   | That's the last attribute, go back to the start
  14.   SEARCHBACK "<"
  15.   SEARCHFORWARD "\(  \*\)\|>"
  16.   LEFT
  17.   #IfText ">"
  18.    | There are no attributes, so we're adding one
  19.    INSERT " "
  20.   #Else
  21.    | Find the right point for the cursor
  22.    RIGHT
  23.    SEARCHFORWARD "=\| \|>"
  24.    LEFT
  25.    #IfText "="
  26.     RIGHT
  27.     #IfText "|""
  28.      RIGHT
  29.     #EndIf
  30.    #Else
  31.     NULL
  32.    #EndIf
  33.   #EndIf
  34.  #Else
  35.   | We're sitting on the next attribute
  36.   | Find the right point for the cursor
  37.   RIGHT
  38.   SEARCHFORWARD "=\| \|>"
  39.   LEFT
  40.   #IfText "="
  41.    RIGHT
  42.    #IfText "|""
  43.     RIGHT
  44.    #EndIf
  45.   #Else
  46.    NULL
  47.   #EndIf
  48.  #EndIf
  49. #Else
  50.  TAB
  51. #EndIf
  52.